package com.hongye.consult.domain;

import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.hongye.common.core.annotation.Excel;
import com.hongye.common.core.web.domain.BaseEntity;
import org.springframework.format.annotation.DateTimeFormat;

/**
 * 用户消息状态对象 tx_user_message_status
 * 
 * @author ruoyi
 * @date 2025-02-13
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@Builder
public class TxUserMessageStatus extends BaseEntity
{
    private static final long serialVersionUID = 1L;


    private Long id;


    @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
    private Long messageId;


    @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
    private Long userId;


    private Integer isRead;

    @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date readTime;

    public void setId(Long id) 
    {
        this.id = id;
    }



    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("messageId", getMessageId())
            .append("userId", getUserId())
            .append("isRead", getIsRead())
            .append("readTime", getReadTime())
            .toString();
    }
}
